<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <style>/*相对定位*/
        .c1{
            width: 100px;
            height: 100px;
            position: relative;
           left: 20px;
           top: 20px;
            background-color: red;}
            .c2{
            
            width: 100px;
            height: 100px;
            background-color: blue;}
    </style>
</head>
<body>
    <div class="box">
        <div class="c1"></div>
        <div class="c2"></div>
    </div>
</body>
</html>